<template>
  <div class="header">
    <div class="logo">
      <img src="../../assets/imgs/logo.png" alt />
    </div>
    <div @click="goSearch" class="search_wrap">
      <search-box :disabled="true"></search-box>
    </div>
  </div>
</template>

<script>
import SearchBox from 'components/search-box/search-box'
export default {
  components: { SearchBox },
  methods: {
    goSearch() {
      if (this.$route.path === '/search') return
      console.log('跳转搜索')
      this.$router.push('/search')
    }
  }
}
</script>

<style lang="stylus" scoped>
.header
  background #cc1919
  display flex
  justify-content space-between
  color #ffffff
  padding 8px 8px
  .logo
    flex 1
    img
      width 90%
      position relative
      top 50%
      left 50%
      transform translate(-50%, -50%)
  .search_wrap
    flex 1
    .search-box
      width 100%
</style>
